package com.digdes.calendar.gwt.client.service;

import com.digdes.calendar.gwt.client.dto.EventDTOImpl;
import com.digdes.calendar.gwt.client.dto.PlaceDTOImpl;
import com.digdes.calendar.gwt.client.dto.UserDTOImpl;
import com.google.gwt.user.client.rpc.AsyncCallback;

import java.util.ArrayList;
import java.util.Date;
import java.util.Set;

public interface CalendarServiceAsync {
    void getEvents(String d, AsyncCallback<ArrayList<EventDTOImpl>> async);

    void getEventsBetween(String dStart, String dFinish, AsyncCallback<ArrayList<EventDTOImpl>> async);

    void getOldEvents(String d, AsyncCallback<ArrayList<EventDTOImpl>> async);

    void getEventByPlaceAndDate(Long id, Date start, Date finish, AsyncCallback<Set<EventDTOImpl>> async);

    void getEventByUserAndDate(Long id, Date start, Date finish, AsyncCallback<Set<EventDTOImpl>> async);

    void saveEvent(EventDTOImpl eventDTO, AsyncCallback<EventDTOImpl> async);

    void getUsers(AsyncCallback<Set<UserDTOImpl>> async);

    void getAllPlace(AsyncCallback<Set<PlaceDTOImpl>> async);

    void deleteEvent(Long id, AsyncCallback<Void> async);

    void addUser(UserDTOImpl userDTO, AsyncCallback<Long> async);
    void addPlace(PlaceDTOImpl placeDTO, AsyncCallback<String> async)   ;
}
